public class towork1 {
    public static void main(String[] args) {
        String a="dad";
        String b=a.toUpperCase();
        System.out.println(b);
        String c=b.toLowerCase();
        System.out.println(c);
        char[]arr=b.toCharArray();

    }
    public int countKeyChanges(String s) {
        String str=s.toLowerCase();
        char[]arr=str.toCharArray();
        int sum=0;
        for(int i=0;i<str.length();i++){
            if(i+1<str.length()&&arr[i]!=arr[i+1]){
                sum++;
            }
        }
        return sum;
    }
}
